package com.ny.demo530;

public class Employee {
    private String name;
    private int age;
    private String number;
    private String password;

    // 无参构造方法
//    public Employee() {}

    // 带参构造方法
    public Employee(String name, int age, String number, String password) {
        this.name = name;
        this.age = age;
        this.number = number;
        this.password = password;
    }

    // Getter 和 Setter 方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    // toString 方法
    @Override
    public String toString() {
        return "Employee{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", number='" + number + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}

